package com.fei.hunqing.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageVo {
    private int code;
    private String msg;
    private long count;//总条数
    private List data;//当前页的查询数据

    /**
     * 创建分页查询的对象
     * @param count 总条数
     * @param data 当前页的结果*/
    public static PageVo ok(long count,List data){
        return new PageVo(0,"OK",count,data);
    }
}